package com.tangbao.util;

import org.codehaus.jackson.jaxrs.JacksonJsonProvider;
import org.glassfish.jersey.filter.LoggingFilter;
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.server.spring.scope.RequestContextFilter;

/**
 * @Discription
 * @Author tangbao
 * @CreateDate 2018/9/1 22:47
 * @Version 1.0
 */
public class RestApplication extends ResourceConfig {
    // 注册JAX-RS应用组件
    public RestApplication(){
        System.out.println("测试来啦！！！！");
        //服务类所在的包路径
        packages("com.tangbao");


        register(RequestContextFilter.class);    // System
        register(JacksonFeature.class);            // System
        register(JacksonJsonProvider.class);    // System
        register(LoggingFilter.class);            // Log

    }
}
